#pragma once
#include "requesthandle.h"

struct ConReqEnum
{
	enum
	{
		USERBUF = 128
	};
};

class ConnectRequest :
	public RequestHandle
{
public:
	ConnectRequest(void);
	virtual ~ConnectRequest(void);

	void SetUser(char *user, UINT len);
	void SetPassword(char *password, UINT len);
	bool Connect(HWND m_hWnd, char *host, char *port);

private:
	virtual int ResponseAnalysis(void);
	int AutoRequest(void);
	virtual void ResponsePWD(void) override;
	//variables
	char m_cUser[ConReqEnum::USERBUF + 1];
	char m_cPassword[ConReqEnum::USERBUF + 1];
	int m_nAR;

	struct m_kConState
	{
		enum
		{
			NONE = 0,
			CONNECT,
			CONNECT_WAIT,
			SYST,
			USER,
			PASS,
			PWD,
			PASV,
			DISCONNECT,
			DIFFOS,
			SAMEOS
		};
	};

};

